package springutil;

import org.springframework.core.LocalVariableTableParameterNameDiscoverer;

import java.lang.reflect.Method;
import java.util.List;

/**
 * spring 直接获取形参
 */
public class JavaSsist {
    /**
     * 形参的名字
     *
     * @param args
     */
    public static void main(String[] args) {
        LocalVariableTableParameterNameDiscoverer u = new LocalVariableTableParameterNameDiscoverer();
        Method[] methods = JavaSsist.class.getDeclaredMethods();
        for (Method method : methods) {
            String[] params = u.getParameterNames(method);
            for (String s : params) {
                System.out.println(s);
            }
        }
    }

    public String get(String a, List b) {
        return "";
    }

}
